package org.pas.fb2.tag;

public class BodyTag extends Tag {

    static final String NAME = "body";

    public BodyTag(Tag parent) {
        super(parent);
    }

    @Override
    public String getName() {
        return NAME;
    }

    @Override
    public Tag onChild(String name) {
        if (TitleTag.NAME.equals(name)) {
            return new TitleTag(this);
        } else if (SectionTag.NAME.equals(name)) {
            return new SectionTag(this);
        } else if (EpigraphTag.NAME.equals(name)) {
            return new EpigraphTag(this);
        }
        return super.onChild(name);
    }
}
